<%@page pageEncoding="UTF-8" %><?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<%
org.sysmo.server.SysmoServer server = (org.sysmo.server.SysmoServer)application.getAttribute("sysmoServer");
org.sysmo.server.node.item.graphgroup.GraphGroup currentGraph = server.getGraphGroup(Integer.parseInt(request.getParameter("gid")));
%>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />

    <link rel="stylesheet" media="screen,projection" type="text/css" href="css/reset.css" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="css/main.css" />
    <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="css/main-msie.css" /><![endif]-->
    <link rel="stylesheet" media="screen,projection" type="text/css" href="css/style.css" />
    <%--<link rel="stylesheet" media="print" type="text/css" href="css/print.css" />--%>

    <title><%= currentGraph.getName() %>(自定义显示) - sysmo</title>
    <script type="text/javascript" src="js/util.js" ></script>
    <script type="text/javascript">
        <!--

        <%
        if (request.getAttribute("error") != null) {
        %>
            alert("<%= org.sysmo.server.util.UtilHelper.encodeJSString((String)request.getAttribute("error")) %>");
        <%
        }
        %>
        -->
    </script>
</head>

<body>

<div id="main">

    <!-- Header -->
    <div id="header">
    
        <p id="logo">sysmo</p>
        
        <div id="slogan">A distributed system monitor tool</div>
    
    </div> <!-- /header -->
    
    <hr class="noscreen" />
    
    <!-- Navigation -->
    <div id="nav" class="box">
    
        <ul>
            <li class=""><a href="AllNodes.do">监控列表</a></li>
            <li class=""><a href="NewNodes.do">新增客户端</a></li>
            <li class=""><a href="Item.do?iid=<%= currentGraph.getParentID() %>">返回所属监控项</a></li>
            <li class="active"><a href="Graph.do?gid=<%= currentGraph.getID() %>">图表(<%= currentGraph.getName() %>)</a></li>
            <li class=""><a href="Users.do">用户管理</a></li>
            <li class=""><a href="Logout.do">退出登录(<%= ((org.sysmo.server.user.User)session.getAttribute("user")).getName() %>)</a></li>
        </ul>
    
    </div> <!-- /nav -->
    
    <hr class="noscreen" />
    
    <!-- Columns -->
    <div id="cols">
        <div id="cols-in" class="box">
    
            <!-- Content -->
            <div id="content">
                
                <h2 class="title-01"><%= currentGraph.getName() %></h2>
                
                <div class="in">
                
                    <!-- Topstory -->
                    <div class="box">
                        <div id="topstory-txt">
                            <form action="CustomGraph.do?gid=<%= currentGraph.getID() %>" method="POST">
                                自定义时间格式为yyyy-mm-dd hh:mm:ss，或yyyy-mm-dd。若省略时间部分则默认为当天零点。<br />
                                <table class="main_table"><%
                                java.text.SimpleDateFormat fmt1 = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                                String startTime = fmt1.format(new java.util.Date((Long)request.getAttribute("startTime")));
                                String endTime = fmt1.format(new java.util.Date((Long)request.getAttribute("endTime")));
                                %>
                                    <tr>
                                        <td clas="input-table-col">自定义时间段</td>
                                        <td><input type="text" name="start" class="customTimeText" value="<%= startTime %>" /> - <input type="text" name="end" class="customTimeText" value="<%= endTime %>" /> <input type="submit" value="确定" /></td>
                                    </tr>
                                </table>
                            </form>
                            <br />
                            <img src="GetGraph.do?gid=<%= currentGraph.getID() %>&g=<%= org.sysmo.server.node.item.graphgroup.GraphGroup.GType.G_BY_SECOND.ordinal() %>&start=<%= request.getAttribute("startTime") %>&end=<%= request.getAttribute("endTime") %>" class="graph_img" />
                        </div> <!-- /topstory-txt -->
                        
                    </div> <!-- /box -->

                </div> <!-- /in -->
                
            </div> <!-- /content -->

            <hr class="noscreen" />

            <!-- Aside -->
            <div id="aside">
                <a name="top"></a>
                <h4 class="title-03">图表粒度</h4>
                
                <div class="in">
                    <ul id="subnav">
                        <li><a href="CustomGraph.do?gid=<%= currentGraph.getID() %>">自定义时间段显示</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#byMinute">最近一分钟</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#byHour">最近一小时</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#byDay">最近一天</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#byWeek">最近一周</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#byMonth">最近一月</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#byYear">最近一年</a></li>
                        <li><a href="Graph.do?gid=<%= currentGraph.getID() %>#warning">此图表警告</a></li>
                    </ul>

                </div> <!-- /in -->

            </div> <!-- /aside -->
            
        </div> <!-- /cols-in -->
    </div> <!-- /cols -->

    <hr class="noscreen" />
    
    <!-- Footer -->
    <div id="footer" class="box">
        
        <p class="f-left"><a href="http://sysmo.googlecode.com">sysmo @ GoogleCode</a></p>

    </div> <!-- /box -->

</div> <!-- /main -->

<!-- Do you want remove this backlinks? Look at www.nuviotemplates.com/payment.php -->
<p id="copy"><a href="http://www.nuviotemplates.com/">Free web templates</a> presented by <a href="http://www.qartin.cz/">QARTIN</a> &ndash; Our tip: <a href="http://www.thinline.cz/">Webdesign</a>, <a href="http://www.cesky-hosting.cz/">Webhosting</a></p>
<!-- Do you want remove this backlinks? Look at www.nuviotemplates.com/payment.php -->

</body>
</html>
